home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group95c.txt / 000008_icon-group-sender _Thu Sep 21 16:28:00 1995.msg < prev    next >
Internet Message Format  |  1996-01-03  |  1KB

  1. Received: by cheltenham.cs.arizona.edu; Thu, 21 Sep 1995 16:20:18 MST
  2. Message-Id: <199509212030.QAA12821@transfer.stratus.com>
  3. Date:           Thu, 21 Sep 95 16:28 EDT
  4. From: Steve_Graham@vos.stratus.com
  5. To: icon-group@cs.arizona.edu
  6. Cc: Steve_Graham@vos.stratus.com
  7. Subject:        Questions on map() and /
  8. Errors-To: icon-group-errors@cs.arizona.edu
  9.  
  10. I have been using Icon Version 8.8 recently for some file cleanup and
  11. verification and I really enjoy the ease with which it allows me to
  12. accomplish my objectives.  I have been able to figure out most of my
  13. questions with the aid of the accompanying documentation and by
  14. reading/posting questions to the newsgroup.  questions have to do with the
  15. following code fragment:
  16.  
  17.         #  Add line number to citations for word
  18.         #
  19.         procedure tabulate(word)
  20.            /uses[word] := table()
  21.            uses[word][lineno] := 1
  22.            return
  23.         end
  24.  
  25.  
  26.         #  Generate words
  27.         #
  28.         procedure words()
  29.            while line := read() do {
  30.               lineno +:= 1
  31.               write(right(lineno,6),"  ",line)
  32.               map(line) ? while tab(upto(&letters)) do {
  33.                  s := tab(many(&letters))
  34.                  if *s < 3 then next  # skip short words
  35.                  suspend s
  36.                  }
  37.               }
  38.         end
  39.  
  40.    What does the / in /uses mean?  What does function does map serve?
  41.  
  42. Thanks in advance.
  43.  
  44. Steve Graham
  45. Steve Graham@vos.stratus.com
  46.